<?php
class AdvertisesFForm extends BaseFormAdmin{
	public function configure(){
		$this->setWidgets(array(
				'name'       		=> new sfWidgetFormInputText(),
				'link_url'        	=> new sfWidgetFormInputText(),
				'photo_url'        	=> new sfWidgetFormInputText(),
				'description' 		=> new sfWidgetFormTextarea(),
				'position'       	=> new sfWidgetFormInputText(),
		));

		$this->setValidators(array(
				'name'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
				'link_url'   => new sfValidatorString(array('max_length' => 255, 'required' => false)),
				'photo_url'   => new sfValidatorString(array('max_length' => 255, 'required' => false)),
				'description' => new sfValidatorString(array('required' => false)),
				'position' 	=> new sfValidatorString(array('required' => false)),
		));
		parent::configure();
		
		$this->widgetSchema->setNameFormat('Advertises[%s]');
		$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
	}
	
}
